<!DOCTYPE html>
<html lang="en" style="font-size: 16px">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1 {
        font-size: 20px;
      }
      .text1 {
        display: inline-block;
        font-size: 2em;
        /* width: 1em;
        height: 1em; */
        background-color: yellowgreen;
      }

      .text2 {
        font-size: 2rem;
      }

      /* .box2 {
        width: 50%;
        height: 100px;
        background-color: yellowgreen;
      } */
      * {
        margin: 0;
        padding: 0;
      }
      .container {
        display: flex;
      }
      .box2 {
        /* width: 187.5px; */
        /* width: 50%; */
        width: 50vw;
        height: 100px;
        background-color: yellowgreen;
      }
    </style>
  </head>
  <body>
    <div class="box1">
      测试单位div
      <span class="text1">测试单位span</span>
    </div>

    <div class="box1">
      测试单位div
      <span class="text2">测试单位span</span>
    </div>

    <div class="box1">
      测试单位div
      <span class="text2">测试单位span</span>
    </div>

    <div class="container">
      <div class="box2"></div>
      <div class="box2"></div>
    </div>
  </body>
</html>
